
<link rel="stylesheet" type="text/css"
      href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-datetimepicker.min.css" />
<script  type="text/javascript"
         src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-datetimepicker.min.js"/>

<script type="text/javascript">
    $(document).ready(function() {
        $("#selectAll").click(function() {
            if ($(this).attr("checked") == "checked") {
                $(":checkbox").attr("checked", true);
            } else {
                $(":checkbox").attr("checked", false);
            }
        });

    });
</script> 

<script type="text/javascript">
    $(function() {
        $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
        $('.tree li.parent_li > span').on('click', function(e) {
            var children = $(this).parent('li.parent_li').find(' > ul > li');
            if (children.is(":visible")) {
                children.hide('fast');
                $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
            } else {
                children.show('fast');
                $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
            }
            e.stopPropagation();
        });
    });</script>
<script type="text/javascript">
    $(function() {
        $("#Event_Shop_CX").click(function() {
            document.getElementById("Event_Shop_CX_View").style.display = '';
            document.getElementById("Event_Clothes_CX_View").style.display = 'none';
        });
        $("#Event_Clothes_CX").click(function() {
            document.getElementById("Event_Shop_CX_View").style.display = 'none';
            document.getElementById("Event_Clothes_CX_View").style.display = '';
        });
    });</script>
<legend>
    <h4>
        <?php
        echo $control->getAjaxLink(array('name' => '功能列表', 'id' => 'showEventList'), array(
            'cooker' => 'BAEvent@showEventList'
        ));
        ?>\
        <?php
        echo $control->getAjaxLink(array('name' => '积分管理', 'id' => 'showMemberPointTypeList'), array(
            'cooker' => 'BAMemberPointCooker@showCurrentMemberPointManagement'
        ));
        ?>\        
        <?php echo '积分记录'; ?>

    </h4>
</legend>

<div>
    <fieldset>
        <table class="table table-hover">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox"  id="selectAll"> 
                    </th>                    
                    <th><?php echo '操作时间'; ?></th>   
                    <th><?php echo '操作类型'; ?></th> 
                    <th><?php echo '积分'; ?></th>                    
                    <!--<th><?php // echo '最终积分'; ?></th>-->                    
                </tr> 
            </thead>
            <tbody>
                <?php
                foreach ($memberPointHistoryList as $id => $list) 
                {
//                    $account['operationType'] = $list->getItem('operationType')->getValue();   
//                    $account['finalCharge'] = $list->getItem('finalCharge')->getValue();       
                    $account['actionTime'] = $list->getItem('actionTime')->getValue();        
                    $account['action'] = $list->getItem('action')->getValue();  
                    $account['point'] = $list->getItem('point')->getValue();  
//                    $account['operationPoint'] = $list->getItem('gender')->getValue(); 
                    if($account['action']=='addPoint')
                        $operationType = '增加';
                    else
                        $operationType = '扣除';
                    $changeTime = $account['actionTime'];
                    $changeTime = date('y/m/d h:i:sa', ($changeTime));
                    ?>
                    <tr>
                        <td><label class="checkbox">
                                <input type="checkbox" name="checkbox[]" value="<?php echo $id; ?>"> 
                            </label></td>
                        <td> <?php echo $changeTime; ?> </td>
                        <td> <?php echo $operationType; ?> </td>
                        <!--<td> <?php // echo $account['finalCharge']; ?> </td>-->     
                        <td> <?php echo $account['point']; ?> </td>                             
                    </tr>
                <?php } ?>
            </tbody>
        </table>

        <div><input type="hidden" name="curPageNo" value="1"></div>

        <div class="pagination">  
            <ul>  
                <li class="active">
                    <a href="javascript:void()">前一页</a>    </li>  
                <li class="active">
                    <a href="javascript:void()">1</a>    </li>  
                <li class="active">
                    <a href="javascript:void()">后一页</a>    </li>  
            </ul>  
        </div>
</div>

